<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>预览 {{ filename }}</title>
    <style>
        body {
            font-family: monospace;
            width:100%
        }
        code.json { color: #444; }
		.app{
			width:100%;
		}
		code{
			display: flex;
			justify-content: space-between;
            padding: 0 100px;
            line-height: 35px;
            font-size: 20px;
            word-wrap: break-word;
            white-space: break-spaces;
		}
    </style>
</head>
<body>
    <h2>文件: {{ filename }}</h2>
	<div class="app">
    {% if content is not none %}
        {% if file_type == 'json' %}
            <code class="json">{{ content | to_nice_json }}</code>
        {% else %}
            <code>{{ content }}</code>
        {% endif %}
    {% else %}
        <p style="color:red;">{{ error }}</p>
    {% endif %}
	</div>
</body>
</html>